/*
 * Copyright (c) 2013 XDream
 * Copyright (c) 2013 bruceshu <shuhuan.bruce@gmail.com>
 * 2024-8-7
 */

#include "DemuxWrapper.h"

#include "mybase/AVDef.h"


#include "DemuxCommon.h"

DemuxWrapper::DemuxWrapper(int id)
    : mId(id)
{
    mExtrator = ExtractorFactory::create(id);
}

DemuxWrapper::~DemuxWrapper()
{
}

int DemuxWrapper::open(std::string url, FfmpegOpt &opt, std::shared_ptr<MetaData> &metaData)
{
    if (mExtrator != nullptr) {
        mExtrator->open(url, opt, metaData);
    }

    return -1;
}

int DemuxWrapper::seek(uint64_t mSec) {
    return 0;

    return -1;
}

int DemuxWrapper::readPacket() {}
void DemuxWrapper::setInterrupt() {}
void DemuxWrapper::close() {}